#include "TouchableComponent.h"
#include "PositionalComponent.h"


TouchableComponent::TouchableComponent(void)
{
}


TouchableComponent::~TouchableComponent(void)
{
}

void TouchableComponent::initMe(GameComponent* parent)
{
	parent->setProperties(TOUCHABLE);
//	entity_position = ((PositionalComponent*)(parent->getComponent(POSITIONED)))->getPos();
	touching = false;
}

bool TouchableComponent::isTouching(AlphaVector a, AlphaVector b)
{
	return false;
}

void TouchableComponent::updateMe(GameComponent* parent)
{
	/*if(entity_position != ((PositionalComponent*)parent->getComponent(POSITIONED))->getPos())
	{
		touching = false;
		LevelVolume l = LevelVolume::getInstance();
		l.broadcast(*entity_position, (PositionalComponent*)parent);
		for(int i = 0; i < possible_contacts.size(); i++)
		{
			if(AlphaVector::distance(*entity_position, *((TouchableComponent*)possible_contacts[i])->getPos()))
			{
				actual_contacts.push_back(possible_contacts[i]);
				touching = true;
			}
		}
		l.listen(*entity_position, this);
	}*/
}